// @ts-ignore
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import ProfileView from '../views/ProfileView.vue'
import LoginView from '../views/LoginView.vue'
import TestView from '../views/TestView.vue'
import PatientManagementView from '../views/PatientManagementView.vue'
import AddPatientView from '../views/AddPatientView.vue'
import EditPatientView from '../views/EditPatientView.vue'
import PatientTestView from '../views/PatientTestView.vue'
import ApiFixTestView from '../views/ApiFixTestView.vue'
import ComprehensiveTestView from '../views/ComprehensiveTestView.vue'
import PickerTestView from '../views/PickerTestView.vue'
import AppointmentNoticeConfirm from '../views/Appointments/AppointmentNoticeConfirm.vue'
import AppointAdd from '../views/Appointments/AppointAdd.vue'
import AppointAddFan from '../views/Appointments/AppointAddFan.vue'
import Department from '../views/Appointments/Department.vue'
import AppointmentDetails from '../views/Appointments/AppointmentDetails.vue'
import AppoinDescing from '../views/Appointments/AppoinDescing.vue'
import OutpatientExpensesView from '../views/outpatient/OutpatientExpensesView.vue'
import PrescriptionDetailsView from '../views/outpatient/PrescriptionDetailsView.vue'
import AppointmentNoticeView from '../views/outpatient/appointment-notice/AppointmentNoticeView.vue'
import HospitalIntroView from '../views/HospitalIntroView.vue'
import AppointmentRecordsView from '../views/appointment-records/AppointmentRecordsView.vue'
import AppointmentDetailsView from '../views/appointment-records/AppointmentDetailsView.vue'
import WaitingQueryView from '../views/waiting-query/WaitingQueryView.vue'
import SelfServicePayment from '../views/zhifubao/SelfServicePayment.vue'
import ZhifuView from '../views/zhifubao/zhifu.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      meta: { title: '首页' }
    },
    {
      path: '/profile',
      name: 'profile',
      component: ProfileView,
      meta: { title: '个人中心' }
    },
    {
      path: '/login',
      name: 'login',
      component: LoginView,
      meta: { title: '登录' }
    },
    {
      path: '/test',
      name: 'test',
      component: TestView,
      meta: { title: 'API测试' }
    },
    {
      path: '/patient/management',
      name: 'patient-management',
      component: PatientManagementView,
      meta: { title: '就诊人管理' }
    },
    {
      path: '/patient/add',
      name: 'add-patient',
      component: AddPatientView,
      meta: { title: '添加就诊人' }
    },
    {
      path: '/patient/edit/:id',
      name: 'edit-patient',
      component: EditPatientView,
      meta: { title: '编辑就诊人' }
    },
    {
      path: '/patient/test',
      name: 'patient-test',
      component: PatientTestView,
      meta: { title: '就诊人功能测试' }
    },
    {
      path: '/api-fix-test',
      name: 'api-fix-test',
      component: ApiFixTestView,
      meta: { title: 'API修复测试' }
    },
    {
      path: '/comprehensive-test',
      name: 'comprehensive-test',
      component: ComprehensiveTestView,
      meta: { title: '全面功能测试' }
    },
    {
      path: '/appointments/notice-confirm',
      name: 'appointment-notice-confirm',
      component: AppointmentNoticeConfirm,
      meta: { title: '预约须知' }
    },
    {
      path: '/appointments/select-patient',
      name: 'select-patient',
      component: AppointAdd,
      meta: { title: '选择就诊人' }
    },
    {
      path: '/appointments/select-patient-fan',
      name: 'select-patient-fan',
      component: AppointAddFan,
      meta: { title: '确认预约' }
    },
    {
      path: '/appointments/department',
      name: 'department',
      component: Department,
      meta: { title: '选择科室' }
    },
    {
      path: '/appointments/details',
      name: 'appointment-details',
      component: AppointmentDetails,
      meta: { title: '确认预约信息' }
    },
    {
      path: '/appointments/schedule/:departmentId',
      name: 'appointment-schedule',
      component: AppoinDescing,
      meta: { title: '预约排班' }
    },
    {
      path: '/outpatient-expenses',
      name: 'outpatient-expenses',
      component: OutpatientExpensesView,
      meta: { title: '门诊费用' }
    },
    {
      path: '/prescription-details/:visitrecordId',
      name: 'prescription-details',
      component: PrescriptionDetailsView,
      meta: { title: '费用详情' }
    },
    {
      path: '/appointment-notice',
      name: 'appointment-notice',
      component: AppointmentNoticeView,
      meta: { title: '预约须知' }
    },
    {
      path: '/hospital-intro',
      name: 'hospital-intro',
      component: HospitalIntroView,
      meta: { title: '医院介绍' }
    },
    {
      path: '/appointment-records',
      name: 'appointment-records',
      component: AppointmentRecordsView,
      meta: { title: '预约挂号记录' }
    },
    {
      path: '/appointment-records/:appointmentId',
      name: 'appointment-record-details',
      component: AppointmentDetailsView,
      meta: { title: '预约详情' }
    },
    {
      path: '/waiting-query',
      name: 'waiting-query',
      component: WaitingQueryView,
      meta: { title: '候诊查询' }
    },
    {
      path: '/zhifubao/self-service-payment',
      name: 'self-service-payment',
      component: SelfServicePayment,
      meta: { title: '自助缴费' }
    },
    {
      path: '/zhifubao/zhifu',
      name: 'zhifu',
      component: ZhifuView,
      meta: { title: '支付' }
    }
  ],
})

export default router
